/**
 * Created by Ljh on 2016/12/7.
 */

//list页面的服务
angular.module('listModule.service', [])
	.factory('listFactory',['$http','configConstant','crossService',function ($http,configConstant,crossService) {
		return {
			//请求列表数据
			getData: function (params,type,fn) {
				var url = configConstant.SERVER_PATH + '/v2/movie/' + type;
				crossService.jsonp(url,params,function (data) {
					console.log(data);
					fn(data);
				});
			},
			//请求搜索数据
			searchData: function (params,type,fn) {
				var url = configConstant.SERVER_PATH + '/v2/movie/' + type;
				console.log(url);
				crossService.jsonp(url,params,function (data) {
					fn(data);
				});
			},


		}
	}])
